package com.net.parser

import com.google.gson.Gson

/**
 * @describe:
 * @Author: lixiaopeng
 * @Date: 2021/5/27
 */
class ObjectParser<T>(private val clazz: Class<T>) {

    var responseStr: String = ""
        set(value) {
            field = value
        }

    fun buildResult(): T? {
        return Gson().fromJson(responseStr, clazz)
    }
}